package com.ilancuo.array;

import java.util.Arrays;

/**
 * System.arraycopy() 方法测试
 */
public class TestArrayCopy {

    private static String[] ARRAY1 = {"H", "e", "l", "l", "o"};

    private static String[] ARRAY2 = {"W", "o", "r", "l", "d", "h", "h", "h"};

    public static void main(String[] args) {
        System.arraycopy(ARRAY1, 0, ARRAY2, 0, ARRAY1.length);
        System.out.println(Arrays.toString(ARRAY2));
    }
}
